import java.util.Scanner;
public class ScannerTest01
{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入你的姓名:");
        String name=scan.next();
        System.out.println(name);
        System.out.println("请输入你的年龄");
        int age=scan.nextInt();
        System.out.println(age);
        System.out.println("请输入你的体重");
        double weight=scan.nextDouble();
        System.out.println(weight);
        //对于char类型的获取，Scanner没有提供相关的方法，只能获取一个字符串
        System.out.println("请输入你的性别");
        String sex=scan.next();
        char genChar=sex.charAt(0);
        System.out.println(genChar);
    }
}